package com.dsjy.yf.address.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dsjy.yf.address.entity.dataobject.CountyDO;

import java.util.List;

/**
 * @author whj
 * @version 1.0
 * @date 2021-01-14 14:48
 */
public interface CountyService {
    /**
     * 查询区县编码最大值
     *
     * @return
     */
    Integer searchMaxCountyCode();

    /**
     * 查询温州市所有CountyDO
     *
     * @return
     */
    List<CountyDO> searchAll();

    /**
     * 新增区县
     *
     * @param countyDO
     * @return
     */
    Integer addCounty(CountyDO countyDO);

    /**
     * 实现增删改
     *
     * @param operate
     * @param countyDO
     * @return
     */
    Integer addUpdDel(String operate, CountyDO countyDO);


    /**
     * 更新
     *
     * @param countyDO
     * @return
     */
    Integer updCounty(CountyDO countyDO);

    /**
     * 分页查询
     *
     * @param pageNum
     * @param pageSize
     * @param wrapper
     * @return
     */
    IPage searchWithPage(Integer pageNum, Integer pageSize, Boolean isAdmin, QueryWrapper wrapper);
}
